const Sequelize = require('sequelize')
const dbConn = require('../plugins/db')

module.exports = dbConn.define('menu', {
  pid: {
    type: Sequelize.BIGINT,
    comment: '上级菜单',
    defaultValue: 0
  },
  menuName: {
    type: Sequelize.STRING,
    comment: '菜单名称'
  },
  menuType: {
    type: Sequelize.BIGINT,
    comment: '菜单类型'
  },
  path: {
    type: Sequelize.STRING,
    comment: '路由'
  },
  icon: {
    type: Sequelize.STRING,
    comment: '图标'
  },
  hidden: {
    type: Sequelize.BIGINT,
    comment: '是否隐藏菜单(1=true,2=false)'
  },
  permission: {
    type: Sequelize.STRING,
    comment: '权限标识'
  }
}, {
  tableName: 'SysMenu',
  comment: '菜单'
})
